package com.codenum.codegenerator;

import java.lang.reflect.InvocationTargetException;
import java.lang.reflect.Method;
import java.util.HashMap;
import java.util.Map;
import java.util.Objects;

/**
* the Tmsqbwzk type
*/
@SuppressWarnings("ALL")
public class Tmsqbwzk {


        private static volatile Tmsqbwzk instance;

        /**
        * 方法MethodMap
        */
        private Map<String, Method> methodMap = new HashMap<>(32);

        private Map<String, Object> saleTypeMap = new HashMap<>(64);

        public static Tmsqbwzk getInstance() {
            if (instance == null) {
                synchronized (Tmsqbwzk.class) {
                    if (instance == null) {
                        instance = new Tmsqbwzk();
                    }
                }
            }
            return instance;
        }


        private Tmsqbwzk() {

        }



    public  Boolean judgeHgzzehuogq(String saleType){
        String methodName = Thread.currentThread().getStackTrace()[1].getMethodName();
        return judgeAttributeValue(saleType, methodName);
    }
    public  Boolean judgeLejwptkgmu(String saleType){
        String methodName = Thread.currentThread().getStackTrace()[1].getMethodName();
        return judgeAttributeValue(saleType, methodName);
    }
    public  Boolean judgeRpcnmhleyw(String saleType){
        String methodName = Thread.currentThread().getStackTrace()[1].getMethodName();
        return judgeAttributeValue(saleType, methodName);
    }
    public  Boolean judgeIyumatrmmj(String saleType){
        String methodName = Thread.currentThread().getStackTrace()[1].getMethodName();
        return judgeAttributeValue(saleType, methodName);
    }
    public  Boolean judgeTmgnhwxdak(String saleType){
        String methodName = Thread.currentThread().getStackTrace()[1].getMethodName();
        return judgeAttributeValue(saleType, methodName);
    }
    public  Boolean judgeRtnwgoavfg(String saleType){
        String methodName = Thread.currentThread().getStackTrace()[1].getMethodName();
        return judgeAttributeValue(saleType, methodName);
    }
    public  Boolean judgeGprtifjuqf(String saleType){
        String methodName = Thread.currentThread().getStackTrace()[1].getMethodName();
        return judgeAttributeValue(saleType, methodName);
    }
    public  Boolean judgeMntmybtlij(String saleType){
        String methodName = Thread.currentThread().getStackTrace()[1].getMethodName();
        return judgeAttributeValue(saleType, methodName);
    }
    public  Boolean judgeLhwuqyfqfo(String saleType){
        String methodName = Thread.currentThread().getStackTrace()[1].getMethodName();
        return judgeAttributeValue(saleType, methodName);
    }
    public  Boolean judgeUlndnxotql(String saleType){
        String methodName = Thread.currentThread().getStackTrace()[1].getMethodName();
        return judgeAttributeValue(saleType, methodName);
    }
    public  Boolean judgeFlkvupllsq(String saleType){
        String methodName = Thread.currentThread().getStackTrace()[1].getMethodName();
        return judgeAttributeValue(saleType, methodName);
    }
    public  Boolean judgeJgbwqeqide(String saleType){
        String methodName = Thread.currentThread().getStackTrace()[1].getMethodName();
        return judgeAttributeValue(saleType, methodName);
    }

    private String  hgzzehuogq;
    private String  lejwptkgmu;
    private String  rpcnmhleyw;
    private String  iyumatrmmj;
    private String  tmgnhwxdak;
    private String  rtnwgoavfg;
    private String  gprtifjuqf;
    private String  mntmybtlij;
    private String  lhwuqyfqfo;
    private String  ulndnxotql;
    private String  flkvupllsq;
    private String  jgbwqeqide;


    public void setHgzzehuogq(String hgzzehuogq){
    this.hgzzehuogq = hgzzehuogq;
    }

    public String getHgzzehuogq(){
    return this.hgzzehuogq;
    }
    public void setLejwptkgmu(String lejwptkgmu){
    this.lejwptkgmu = lejwptkgmu;
    }

    public String getLejwptkgmu(){
    return this.lejwptkgmu;
    }
    public void setRpcnmhleyw(String rpcnmhleyw){
    this.rpcnmhleyw = rpcnmhleyw;
    }

    public String getRpcnmhleyw(){
    return this.rpcnmhleyw;
    }
    public void setIyumatrmmj(String iyumatrmmj){
    this.iyumatrmmj = iyumatrmmj;
    }

    public String getIyumatrmmj(){
    return this.iyumatrmmj;
    }
    public void setTmgnhwxdak(String tmgnhwxdak){
    this.tmgnhwxdak = tmgnhwxdak;
    }

    public String getTmgnhwxdak(){
    return this.tmgnhwxdak;
    }
    public void setRtnwgoavfg(String rtnwgoavfg){
    this.rtnwgoavfg = rtnwgoavfg;
    }

    public String getRtnwgoavfg(){
    return this.rtnwgoavfg;
    }
    public void setGprtifjuqf(String gprtifjuqf){
    this.gprtifjuqf = gprtifjuqf;
    }

    public String getGprtifjuqf(){
    return this.gprtifjuqf;
    }
    public void setMntmybtlij(String mntmybtlij){
    this.mntmybtlij = mntmybtlij;
    }

    public String getMntmybtlij(){
    return this.mntmybtlij;
    }
    public void setLhwuqyfqfo(String lhwuqyfqfo){
    this.lhwuqyfqfo = lhwuqyfqfo;
    }

    public String getLhwuqyfqfo(){
    return this.lhwuqyfqfo;
    }
    public void setUlndnxotql(String ulndnxotql){
    this.ulndnxotql = ulndnxotql;
    }

    public String getUlndnxotql(){
    return this.ulndnxotql;
    }
    public void setFlkvupllsq(String flkvupllsq){
    this.flkvupllsq = flkvupllsq;
    }

    public String getFlkvupllsq(){
    return this.flkvupllsq;
    }
    public void setJgbwqeqide(String jgbwqeqide){
    this.jgbwqeqide = jgbwqeqide;
    }

    public String getJgbwqeqide(){
    return this.jgbwqeqide;
    }

    void setMethodMap(Map<String, Method> methodMap) {
        this.methodMap = methodMap;
    }

   void setSaleTypeMap(Map<String, Object> saleTypeMap) {
        this.saleTypeMap = saleTypeMap;
    }

    public Boolean judgeAttributeValue(String saleType, String methodName) {
        try {
            Object saleTypeObject = saleTypeMap.get(saleType);
            String targetMethod = methodName.replace("judge", "get");
            String attr = methodName.replace("judge", "");
            Method method = methodMap.get(targetMethod);
            Object invoke = method.invoke(saleTypeObject);
            return Objects.isNull(invoke) ? Boolean.FALSE : Objects.equals(invoke.toString().toLowerCase(), attr.toLowerCase());
        } catch (InvocationTargetException e) {
            throw new RuntimeException(e.getMessage());
        } catch (IllegalAccessException e) {
            throw new RuntimeException(e.getMessage());
        }
    }

}